package com.ssi.mrms.action.room;

import java.util.List;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Namespaces;
import org.apache.struts2.convention.annotation.Result;

import com.ssi.mrms.action.BaseAction;
import com.ssi.mrms.service.ComboboxService;
import com.ssi.mrms.view.SelectBoxView;


@Namespaces(value = { @Namespace("/room") })
public class RM008Action extends BaseAction {
	private static final Logger logger = Logger.getLogger(RM008Action.class);
    private ComboboxService comboboxService  = lookupBean(ComboboxService.class, "ComboboxService");

    
    private List<SelectBoxView> comboTower = null;
    private List<SelectBoxView> comboFloor = null;
    private List<SelectBoxView> comboUnit = null;
    private List<SelectBoxView> comboAddress = null;
    
    public RM008Action() {
    	logger.info("## ");
		comboTower = comboboxService.getTower();
		comboFloor = comboboxService.getFloor(null);
		comboUnit = comboboxService.getUnit(null);
		comboAddress = comboboxService.getAddress(null);
	}
    
    
	@Action(value = "/RM008", results = { @Result(name = "success", location = "RM008.tiles", type = "tiles") })
	public String execute() throws Exception {
		logger.info("## "+this.getClass().getSimpleName());

		return SUCCESS;
	}


	public List<SelectBoxView> getComboTower() {
		return comboTower;
	}


	public void setComboTower(List<SelectBoxView> comboTower) {
		this.comboTower = comboTower;
	}


	public List<SelectBoxView> getComboFloor() {
		return comboFloor;
	}


	public void setComboFloor(List<SelectBoxView> comboFloor) {
		this.comboFloor = comboFloor;
	}


	public List<SelectBoxView> getComboUnit() {
		return comboUnit;
	}


	public void setComboUnit(List<SelectBoxView> comboUnit) {
		this.comboUnit = comboUnit;
	}


	public List<SelectBoxView> getComboAddress() {
		return comboAddress;
	}


	public void setComboAddress(List<SelectBoxView> comboAddress) {
		this.comboAddress = comboAddress;
	}

	
	
}
